import request from '@/utils/request'
const BASE_URL = '/neptune'
// 获取分类列表
export function categoryList(params) {
  return request({
    url: `${BASE_URL}/category/list.svc`,
    method: 'GET',
    params
  })
}

// 新增一个分类
export function categoryInsert(data) {
  return request({
    url: `${BASE_URL}/category/insert.svc`,
    method: 'POST',
    data
  })
}

// 更新一个分类
export function categoryUpdate(data) {
  return request({
    url: `${BASE_URL}/category/${data.CategoryId}/update.svc`,
    method: 'PUT',
    data
  })
}

// 获取单个分类详情
export function categoryGet(data) {
  return request({
    url: `${BASE_URL}/category/${data.CategoryId}/get.svc`,
    method: 'GET'
  })
}

// 删除应用
export function categoryDelete(data) {
  return request({
    url: `${BASE_URL}/category/${data.CategoryId}/delete.svc`,
    method: 'DELETE'
  })
}
